<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <script src="__USER__/js/jquery-1.8.0.js"></script>
    <script src="__USER__/js/layui/layui.js"></script>
    <link rel="stylesheet" href="__USER__/js/layui/css/layui.css">
    <link rel="stylesheet" href="__USER__/css/base.css">
    <link rel="stylesheet" href="__USER__/css/page/head.css">
    <link rel="stylesheet" href="__USER__/css/page/foot.css">
    <link rel="stylesheet" href="__USER__/css/page/index.css">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
    <div style="text-align: center ;font-size: 35px;font-family: Consolas">
        消息通知(新消息往下看)
        <button type="button" class="layui-btn" id="clear" style="margin-left: 10%">一键清除</button>
    </div>
    <hr class="hr15">
</fieldset>
<ul class="layui-timeline" style="font-family: Consolas">
    {volist name="notify" id="vo"}
    <li class="layui-timeline-item">
        <i class="layui-icon layui-timeline-axis"></i>
        <div class="layui-timeline-content layui-text">
            <h3 class="layui-timeline-title"><span style="color: rgba(55,148,222,0.68)">{$vo.time}</span>
                {eq name="vo.estatus" value="1"}
                <span style="color: #2BC807;font-size: 15px">（新消息）</span>
                {/eq}
                {eq name="vo.estatus" value="2"}
                <span style="font-size: 15px">（已读）</span>
                {/eq}
            </h3>
            <p style="font-size: 16px">
                {eq name="vo.opera" value="1"}
                您有<span style="color: red;font-size: 18px"><u>新的预约</u></span>，学生名字：<span
                    style="font-size: 20px;color: black"><u>{$vo.write}</u></span>
                ，预约时间：<span style="font-size: 20px;color: black"><u>{$vo.ordertime}</u></span> ，请准时到场！
                {/eq}
                {eq name="vo.opera" value="2"}
                您有<span style="color: #0000FF;font-size: 18px"><u>预约取消</u></span>，学生名字：<span
                    style="font-size: 20px;color: black"><u>{$vo.write}</u></span>
                ，<span style="font-size: 18px;color:#0000FF ">原</span>预约时间：<span style="font-size: 20px;color: black"><u>{$vo.ordertime}</u></span> ，请注意查看！
                {/eq}
                {eq name="vo.opera" value="3"}
                您有<span style="color: #0000FF;font-size: 18px"><u>新的留言</u></span>，留言时间：
                <span style="font-size: 20px;color: black"><u>{$vo.ordertime}</u></span> ，请注意查看！
                {/eq}
                {eq name="vo.aopera" value="1"}
                管理员：<span style="font-size: 20px;color: black"><u>{$vo.write}</u></span>
                <span style="color: #0000FF;font-size: 18px"><u>修改预约</u></span>
                ，<span style="font-size: 18px;color: #0000FF">新</span>预约时间：<span style="font-size: 20px;color: black"><u>{$vo.ordertime}</u></span> ，请注意查看！
                {/eq}
                {eq name="vo.aopera" value="2"}
                管理员：<span style="font-size: 20px;color: black"><u>{$vo.write}</u></span>
                <span style="color: #0000FF;font-size: 18px"><u>取消预约</u></span>
                ，<span style="font-size: 18px;color: #0000FF">原</span>预约时间：<span style="font-size: 20px;color: black"><u>{$vo.ordertime}</u></span> ，请注意查看！
                {/eq}
            <hr>
        </div>
    </li>
    {/volist}
</ul>
</body>
<script>


    layui.use(['form', 'layer', 'jquery', 'table'], function () {
        var table = layui.table;
        $ = layui.jquery;
        var form = layui.form,
            layer = layui.layer;
        var code;

        $("#clear").click(function () {
            $.ajax({
                type: "get",
                url: "{:url('Expert/clear')}",
                async: false,
                success: function (data) {
                    //console.log(data);
                    if (data == 1) {
                        //layer.msg("清除成功！");
                        layer.msg("清除成功！", {icon: 1, time: 1000}, function () {
                            setTimeout('window.location.reload()', 100);
                        });
                    } else {
                        //layer.msg("清除失败！");
                        layer.msg("清除失败！", {icon: 2, time: 1000}, function () {
                            setTimeout('window.location.reload()', 100);
                        });
                    }
                }
            });
        });

    });

</script>
</html>